package com.black.app.service.impl.exercise;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.black.app.domain.exercise.AppExercisePart;
import com.black.app.domain.resp.exercise.AppExercisePartResp;
import com.black.app.service.exercise.AppExercisePartService;
import com.black.app.mapper.exercise.AppExercisePartMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author L
* @description 针对表【app_exercise_part】的数据库操作Service实现
* @createDate 2024-10-23 16:57:08
*/
@Service
public class AppExercisePartServiceImpl extends ServiceImpl<AppExercisePartMapper, AppExercisePart>
    implements AppExercisePartService{

    @Override
    public List<AppExercisePartResp> findByTidAll(Long typeId) {
        return this.baseMapper.findByTidAll(typeId);
    }

    @Override
    public AppExercisePart getByTid(Integer tid) {
        LambdaQueryWrapper<AppExercisePart> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(AppExercisePart::getTId,tid);
        return this.baseMapper.selectOne(queryWrapper);
    }
}




